package assembly.spring.boot.demo.entity;

import assembly.spring.boot.demo.config.mybatis.flex.IDTBaseEntityWrapper;
import assembly.spring.boot.demo.config.mybatis.flex.IDTInsertListener;
import assembly.spring.boot.demo.config.mybatis.flex.IDTUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "pl_u_user", onInsert = IDTInsertListener.class, onUpdate = IDTUpdateListener.class)
public class UserEntity extends IDTBaseEntityWrapper implements Serializable {
  
  /**
   * ID
   */
  @Id(keyType = KeyType.Generator, value = "flexId")
  private String id;
  
  /**
   * 名称
   */
  private String name;
  
  
  /**
   * 手机号
   */
  private String phone;
  
  /**
   * 密码
   */
  private String password;
  
  
  /**
   * 邮箱
   */
  private String email;
  
  /**
   * 状态 0：删除 1：正常
   */
  @Column(isLogicDelete = true)
  private Integer active;
}
